<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>提现账户</title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <meta name="Author" content="Meida Team"/>
    <meta name="Copyright" content="Meida"/>
    <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon"/>
    <% include("include.html"){}%>
    <link href="/template/pc1/css/login.css" rel="stylesheet" type="text/css"/>
    <link href="/template/pc1/css/register.css" rel="stylesheet" type="text/css"/>
    <link href="/template/pc1/css/member_center.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/template/pc1/js/login.js"></script>
    <script type="text/javascript" src="/template/pc1/js/register.js"></script>
</head>
<body class="memberCenter">
<%include("header_index_sys.html"){}%>
<div class="body passwordInput">
    <div class="bodyLeft">
        <div class="memberInfo">
            <div class="top"></div>
            <div class="middle">
                <p>欢迎您！<span class="username">${loginMember.username}</span> [<a class="userLogout"
                                                                                 href="/memberCenter/logout">退出</a>]</p>
                <p>会员等级:<span class="red"> ${loginMember.memberRank.name!}</span></p>
            </div>
            <div class="bottom"></div>
        </div>
        <div class="blank"></div>
        <!-- 侧边栏 -->
        <%include("sidebar_customer.html"){}%>
    </div>
    <div class="bodyRight">
        <div class="memberCenterDetail">
            <div class="top">
                账户信息
            </div>
            <div style="text-align: center;color: #ffa81f;margin-bottom: 20px">
                为保证您能提现成功，请务必正确填写账户内容,其中，银行卡信息必须填写！提交提现申请后，将在2-3个工作日内到账！
            </div>
            <div class="middle">
                <div class="blank"></div>
                <form id="inputForm" class="validate" method="post" style="color: #333">
                    <table class="inputTable tabContent">
                        <tr>
                            <th style="font-size: 16px;margin: 20px;width: 200px">
                                银行卡信息:
                            </th>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                持卡人:
                            </th>
                            <td>
                                <input id="name" name="name" value="${tocashBank.name!}" class="formText"
                                       placeholder="请输入姓名（请务必与银行卡姓名一致）"/>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                卡号:
                            </th>
                            <td>
                                <input id="cardNumber" name="cardNumber" type="text" value="${tocashBank.cardNumber!}"
                                       class="formText" placeholder="银行卡号"/>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                银行名称:
                            </th>
                            <td>
                                <input name="cardCount" id="cardCount" value="${tocashBank.cardCount!}" class="formText"
                                       placeholder="银行名称"/>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                开户行地址:
                            </th>
                            <td>
                                <input name="cardAddress" id="cardAddress" value="${tocashBank.cardAddress!}"
                                       class="formText" placeholder="开户行地址"/>
                            </td>
                        </tr>
                        <!-- <tr>
                             <th>
                                 身份证号:
                             </th>
                             <td>
                                 <input name="idNumber" class="formText" placeholder="身份证号码"/>
                             </td>
                         </tr>-->
                        <tr>
                            <th style="font-size: 16px;margin: 20px;width: 200px">
                                微信账户信息:
                            </th>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                微信账户:
                            </th>
                            <td>
                                <input name="weChatAccount" id="weChatAccount" value="${tocashBank.weChatAccount!}"
                                       class="formText" placeholder="微信号"/>
                            </td>
                        </tr>
                        <tr>
                            <th style="font-size: 16px;margin: 20px;width: 200px">
                                支付宝账户信息:
                            </th>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                支付宝账户:
                            </th>
                            <td>
                                <input name="aliPayAccount" id="aliPayAccount" value="${tocashBank.aliPayAccount!}"
                                       class="formText" placeholder="支付宝帐号"/>
                            </td>
                        </tr>

                        <tr>
                            <th>
                                &nbsp;
                            </th>
                            <td>
                                <input type="button" class="submitButton" id="submit" value="提 交" hidefocus="true"/>
                            </td>
                        </tr>
                    </table>
                </form>
                <div class="blank"></div>
            </div>
            <div class="bottom"></div>
        </div>
    </div>
    <div class="blank"></div>
</div>
<div class="blank"></div>
<%include("footer.html"){}%>
<script>
    $('#submit').on('click', function () {
        var name = $('#name').val();
        var cardCount = $('#cardCount').val();
        var cardNumber = $('#cardNumber').val();
        var cardAddress = $('#cardAddress').val();
        var weChatAccount = $('#weChatAccount').val();
        var aliPayAccount = $('#aliPayAccount').val();

        if (!name || !cardAddress || !cardCount || !cardNumber) {
            $.tip("请完善银行卡信息");
            return false;
        }
        $.ajax({
            url: "/b/pc/cashingbank/save",
            data: {
                name: name,
                cardCount: cardCount,
                cardNumber: cardNumber,
                cardAddress: cardAddress,
                weChatAccount: weChatAccount,
                aliPayAccount: aliPayAccount

            },
            success: function (data) {
                if (data.state == 'ok') {
                    $.tip(data.msg);
                } else {
                    $.tip(data.msg);
                }

            }
        })
    })

</script>
</body>
</html>